  <?php
\App\admin\Service\OA::load();
use App\Models\Admin\UserModel;
use App\Services\Jiguang\JMessageApi;

 use Illuminate\Support\Facades\Redis;
set_time_limit(0);
   // $f= Redis
    $key='akey';
    $val='123456789';
    //$r=Redis::exists($key);
   // $r=Redis::setex($key,1000,$val);
 ///   var_dump($r);
    exit('ss
    ');
    var_dump(Redis::get($key));


exit('');

////批量修改同步用户名
    $list=UserModel::where([
        'jiguang_id'=>'mc_cf9f3881b72c9a93423c424125f245e0'
    ])-> get();
    foreach ($list as $vo){
        echo $vo->name."\t".$vo->jiguang_id;
        $f=JMessageApi::upNameNick($vo->jiguang_id,$vo->name);
        var_dump($f);
        echo "\r\n";
    }
exit;



/*
    $list=UserModel::get();
    foreach ($list  as $vo){
       $jiguang_id=$vo->jiguang_id;
        $jiguang_pass=$vo->jiguang_pass;
        JMessageApi::register($jiguang_id,$jiguang_pass);
    }
*/

 ///